home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 July / Macworld (1999-07).dmg / Shareware World / Info / For Developers / Mops 3.4.sea / Mops source / SpeechStuff folder / Utility Code < prev    next >
Text File  |  1993-08-20  |  499b  |  37 lines

  1. : x^y { x y / storage -- }
  2.     1 -> storage
  3.     y 0 = nif
  4.         y 0 do
  5.             storage x * -> storage
  6.         loop
  7.     then
  8.     storage
  9.     ;
  10.  
  11. : NumberToString { number addr / count quot -- addr len }
  12.     0 -> count
  13.     begin
  14.         1 ++> count
  15.         10 count x^y number > 
  16.     until
  17.     0 count 1- do
  18.         number 10 i x^y /mod -> quot -> number
  19.         quot 48 + addr count 1- i - + c!
  20.     -1 +loop
  21.     addr count
  22.     ;
  23.  
  24. : WaitASec { / end -- }
  25.     global ticks @
  26.     60 + -> end
  27.     begin
  28.         end global ticks @ =
  29.     until
  30.     ;
  31.     
  32. : WaitFor#Secs ( n -- )
  33.     0 do
  34.         WaitASec
  35.     loop
  36.     ;
  37.